﻿using DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace KhoaLuan.MainSys
{
    public partial class Article : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var _articleid = Request.QueryString["ArticleID"];
                if (_articleid != null)
                {
                    var proxy = new tbPosts_Proxy();
                    var article = proxy.GetById_tbPosts_Proxy(int.Parse(_articleid)).ToObject<tbPosts>();
                    var _orgid = Request.QueryString["OrgID"];
                    if (_orgid == null)
                        Response.Redirect(Request.RawUrl + "&OrgID=" + article.OrgID);
                }
            }

        }
    }
}